<template>
    <div>
      <div>
        <newList v-for="item of list" :key="item.id" :list="item" />
      </div>
      <div v-if="!list[0]" class="nocontent">
        暂时没有收藏文章
      </div>
    </div>
</template>

<script>
import newList from '@/view/news/components/newList'
import { getmyLike } from '@/api/my'
export default {
  name: 'mylike',
  data () {
    return {
      list: []
    }
  },
  components: {
    newList
  },
  created () {
    this.getlist()
  },
  methods: {
    getlist () {
      getmyLike(this.cateid,this.search).then(res => {
        this.list = res.data
      })
    }
  }
}
</script>

<style scoped>
  .nocontent{
    text-align: center;
    padding:1rem .2rem;
    color: #666;
  }
</style>
